#define _CRT_SECURE_NO_WARNINGS 01

#include <stdio.h>

int judge(int num)
{
    int sum = 0;
    for (int i = 2; i <= num; i++)
    {
        int rear = 0;
        for (int j = 1; j < i; j++)
        {
            if (i % j == 0)
                rear += j;
        }
        if (rear == i)
            sum++;
    }
    return sum;
}

int main() {
    int a;
    while (scanf("%d", &a) != EOF) {
        printf("%d\n", judge(a));
    }
    return 0;
}


int ret = 0, max = 0;
for (int i = 0; i < numsSize; i++)
{
    if (1 & nums[i])
    {
        ret++;
    }
    else
    {
        ret = 0;
    }
    if (ret > max)
        max = ret;
}
return max;